package com.aiyun.websocket.tiowebsocketdemo.config;


import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "tio.websocket", ignoreInvalidFields = true)
public class TioProperties {

	private final Server server = new Server();

	public static class Server{

		// websocket 默认端口号
		private int port = 9876;

		// 心跳超时时间
		private long heartbeatTimeout = 60000;

		// 协议名字
		private String protocalName = "tio";


		public int getPort() {
			return port;
		}

		public void setPort(int port) {
			this.port = port;
		}

		public long getHeartbeatTimeout() {
			return heartbeatTimeout;
		}

		public void setHeartbeatTimeout(long heartbeatTimeout) {
			this.heartbeatTimeout = heartbeatTimeout;
		}

		public String getProtocalName() {
			return protocalName;
		}

		public void setProtocalName(String protocalName) {
			this.protocalName = protocalName;
		}
	}

	public Server getServer() {
		return server;
	}
}
